package top.system.dept.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: Order
 * @Author: Amosen
 * @Since: 2021/5/21
 */

// 物资申请订单
// 实现Serializable接口，序列化缓存对象
public class ThingOrder implements Serializable {

    private static final long serialVersionUID = -9096380035766000917L;

    // 数据库索引id
    private Integer id;

    // 工单号
    private String orderId;

    private List<ApplyItem> items;

    // 申请时间
    private Date applyDate;

    // 使用时间
    private Date useDate;

    // 归还时间
    private Date returnDate;

    // 申请部门
    private Dept dept;

    // 申请人
    private User applyUser;

    // 申请状态
    private String status;

    public ThingOrder() {
    }

    public ThingOrder(Integer id, String orderId,
                      List<ApplyItem> items, Date applyDate,
                      Date useDate, Date returnDate,
                      Dept dept, User applyUser, String status) {
        this.id = id;
        this.orderId = orderId;
        this.items = items;
        this.applyDate = applyDate;
        this.useDate = useDate;
        this.returnDate = returnDate;
        this.dept = dept;
        this.applyUser = applyUser;
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public List<ApplyItem> getItems() {
        return items;
    }

    public void setItems(List<ApplyItem> item) {
        this.items = item;
    }

    public User getApplyUser() {
        return applyUser;
    }

    public void setApplyUser(User applyUser) {
        this.applyUser = applyUser;
    }

    public Date getApplyDate() {
        return applyDate;
    }

    public void setApplyDate(Date applyDate) {
        this.applyDate = applyDate;
    }

    public Date getUseDate() {
        return useDate;
    }

    public void setUseDate(Date useDate) {
        this.useDate = useDate;
    }

    public Date getReturnDate() {
        return returnDate;
    }

    public void setReturnDate(Date returnDate) {
        this.returnDate = returnDate;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "ThingOrder{" +
                "id=" + id +
                ", orderId='" + orderId + '\'' +
                ", items=" + items +
                ", applyDate=" + applyDate +
                ", useDate=" + useDate +
                ", returnDate=" + returnDate +
                ", dept=" + dept +
                ", applyUser=" + applyUser +
                ", status='" + status + '\'' +
                '}';
    }
}
